const mount = require('koa-mount');
const Koa = require('koa');

const a = new Koa();
a.use(async function (ctx, next) {
  await next();
  ctx.body = 'Hello';
});

const b = new Koa();
b.use(async function (ctx, next) {
  await next();
  ctx.body = 'World';
});

// app
const app = new Koa();

app.use(mount('/hello', a));
app.use(mount('/world', b));

app.listen(9000);